const useCommodityStore = defineStore(
  // 唯一ID
  'PageNumberCache', () => {
    // 商品管理页码缓存
    let MerchandiseControlPage = 1
    let MerchandiseControlType = true

    function GetMerchandiseControlPage() {
      return MerchandiseControlPage
    }
    function SetMerchandiseControlPage(number: number) {
      MerchandiseControlPage = number
    }
    function GetMerchandiseControlType() {
      return MerchandiseControlType
    }
    function SetMerchandiseControlType(val: boolean) {
      MerchandiseControlType = val
    }
    // 代金券
    let VoucherPage = 1
    function GetVoucherPage() {
      return VoucherPage
    }
    function SetVoucherPage(number: number) {
      VoucherPage = number
    }
    // 零售订单
    let RetailOrderPage = 1
    function GetRetailOrderPage() {
      return RetailOrderPage
    }
    function SetRetailOrderPage(number: number) {
      RetailOrderPage = number
    }
    // 退款申请
    let RefundApplyPage = 1
    function GetRefundApplyPage() {
      return RefundApplyPage
    }
    function SetRefundApplyPage(number: number) {
      RefundApplyPage = number
    }
    // 生日礼
    let birthdayPage = 1
    let birthdayUserPage = 1
    function GetBirthdayPage() {
      return birthdayPage
    }
    function SetBirthdayPage(number: number) {
      birthdayPage = number
    }
    function GetBirthdayUserPage() {
      return birthdayUserPage
    }
    function SetBirthdayUserPage(number: number) {
      birthdayUserPage = number
    }
    // 零售订单
    let hexiaoUserPage = 1
    function GetHexiaoUserPage() {
      return hexiaoUserPage
    }
    function SetHexiaoUserPage(number: number) {
      hexiaoUserPage = number
    }

    // 零售订单
    let postAgePage = 1
    function GetPostAgePagePage() {
      return postAgePage
    }
    function SetPostAgePagePage(number: number) {
      postAgePage = number
    }

    // 会员级别
    let memberLevelsPage = 1
    function GetMemberLevelsPage() {
      return memberLevelsPage
    }
    function SetMemberLevelsPage(number: number) {
      memberLevelsPage = number
    }

    // 会员商品
    let memberproductPage = 1
    function GetMemberProductPage() {
      return memberproductPage
    }
    function SetMemberProductPage(number: number) {
      memberproductPage = number
    }

    // 会员签到
    let memberSigninPage = 1
    function GetMemberSigninPage() {
      return memberSigninPage
    }
    function SetMemberSigninPage(number: number) {
      return memberSigninPage = number
    }

    // 店铺管理
    let shopPage = 1
    function GetShopPage() {
      return shopPage
    }
    function SetShopPage(number: number) {
      return shopPage = number
    }

    // 店铺管理
    let storePage = 1
    function GetStorePage() {
      return storePage
    }
    function SetStorePage(number: number) {
      return storePage = number
    }

    // 人员管理
    let accountPage = 1
    function GetAccountPage() {
      return accountPage
    }
    function SetAccountPage(number: number) {
      return accountPage = number
    }

    // 业绩详情
    let performancePage = 1
    function GetPerformancePage() {
      return performancePage
    }
    function SetPerformancePage(number: number) {
      return performancePage = number
    }

    // 业绩详情
    // let aaaaaaPage = 1
    // function GetaaaaaaPage() {
    //   return aaaaaaPage
    // }
    // function SetaaaaaaPage(number: number) {
    //   return aaaaaaPage = number
    // }

    // 专题管理
    let subjectPage = 1
    function GetSubjectPage() {
      return subjectPage
    }
    function SetSubjectPage(number: number) {
      return subjectPage = number
    }

    // 专题关联商品
    let subjectProjectPage = 1
    function GetSubjectProjectPage() {
      return subjectProjectPage
    }
    function SetSubjectProjectPage(number: number) {
      return subjectProjectPage = number
    }

    // 预约直播
    let livingPage = 1
    function GetLivingPage() {
      return livingPage
    }
    function SetLivingPage(number: number) {
      return livingPage = number
    }

    // 落地页活动
    let collectionPage = 1
    function GetCollectionPage() {
      return collectionPage
    }
    function SetCollectionPage(number: number) {
      return collectionPage = number
    }
    // 福卡活动
    let fukaPage = 1
    function GetFukaPage() {
      return fukaPage
    }
    function SetFukaPage(number: number) {
      return fukaPage = number
    }

    // 福卡关联商品
    let fukaProductPage = 1
    function GetFukaProductPage() {
      return fukaProductPage
    }
    function SetFukaProductPage(number: number) {
      return fukaProductPage = number
    }

    // 福卡奖品池
    let fukaPrizePage = 1
    function GetFukaPrizePage() {
      return fukaPrizePage
    }
    function SetFukaPrizePage(number: number) {
      return fukaPrizePage = number
    }

    // 福卡用户列表
    let fukaUserPage = 1
    function GetFukaUserPage() {
      return fukaUserPage
    }
    function SetFukaUserPage(number: number) {
      return fukaUserPage = number
    }

    // 福卡用户奖品
    let fukaUserPrizePage = 1
    function GetFukaUserPrizePage() {
      return fukaUserPrizePage
    }
    function SetFukaUserPrizePage(number: number) {
      return fukaUserPrizePage = number
    }

    // 福卡活动用户福卡详情
    let fukaUserDetailPage = 1
    function GetFukaUserDetailPage() {
      return fukaUserDetailPage
    }
    function SetFukaUserDetailPage(number: number) {
      return fukaUserDetailPage = number
    }

    // 福卡活动集福助力记录
    let fukaUserZhuliPage = 1
    function GetFukaUserZhuliPage() {
      return fukaUserZhuliPage
    }
    function SetFukaUserZhuliPage(number: number) {
      return fukaUserZhuliPage = number
    }

    return {
      GetMerchandiseControlPage,
      SetMerchandiseControlPage,
      GetMerchandiseControlType,
      SetMerchandiseControlType,
      GetVoucherPage,
      SetVoucherPage,
      GetRetailOrderPage,
      SetRetailOrderPage,
      GetRefundApplyPage,
      SetRefundApplyPage,
      GetBirthdayPage,
      SetBirthdayPage,
      GetBirthdayUserPage,
      SetBirthdayUserPage,
      GetHexiaoUserPage,
      SetHexiaoUserPage,
      GetPostAgePagePage,
      SetPostAgePagePage,
      GetMemberLevelsPage,
      SetMemberLevelsPage,
      GetMemberProductPage,
      SetMemberProductPage,
      GetMemberSigninPage,
      SetMemberSigninPage,
      GetShopPage,
      SetShopPage,
      GetStorePage,
      SetStorePage,
      GetAccountPage,
      SetAccountPage,
      GetPerformancePage,
      SetPerformancePage,
      GetSubjectPage,
      SetSubjectPage,
      GetSubjectProjectPage,
      SetSubjectProjectPage,
      GetLivingPage,
      SetLivingPage,
      GetCollectionPage,
      SetCollectionPage,
      GetFukaPage,
      SetFukaPage,
      GetFukaProductPage,
      SetFukaProductPage,
      GetFukaPrizePage,
      SetFukaPrizePage,
      GetFukaUserPage,
      SetFukaUserPage,
      GetFukaUserPrizePage,
      SetFukaUserPrizePage,
      GetFukaUserDetailPage,
      SetFukaUserDetailPage,
      GetFukaUserZhuliPage,
      SetFukaUserZhuliPage,
    }
  },
)
export default useCommodityStore
